import axios from 'axios';
const url = {
    getHeros: '../../../../static/heros.json',
    getStudents: '../../../../static/students.json'
}

export const getHeros = (val) => {
    if (val === 'heros') {
        return axios.get(url.getHeros).then((res) => Promise.resolve(res.data))
    }
    if (val === 'students') {
        return axios.get(url.getStudents).then((res) => Promise.resolve(res.data))
    }
}
